from django_filters.filterset import FilterSet
from django_filters import filters

from . import models
# 电影评分过滤
class MovieLevelFilterSet(FilterSet):
    # 过滤输入评分之上的电影
    min_level = filters.NumberFilter(field_name='level', lookup_expr='gt')
    # max_price = filters.NumberFilter(field_name='price', lookup_expr='lt')
    class Meta:
        model=models.Movie
        fields=['level','movie_category']